/*
 * The MIT License
 *
 * Copyright 2015 chronosinfo.com.
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 * Autor John Vanderson M Lima
 */

package com.chronos.pafecf.entidades;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author usuario
 */
@Entity
@Table(name = "CONTAS_PARCELAS", catalog = "", schema = "")
@NamedQueries({
    @NamedQuery(name = "ContasParcelas.findAll", query = "SELECT c FROM ContasParcelas c")})
public class ContasParcelas implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID", nullable = false)
    private Integer id;
    @Column(name = "ID_MEIOS_PAGAMENTO")
    private Integer idMeiosPagamento;
    @Column(name = "ID_CHEQUE_EMITIDO")
    private Integer idChequeEmitido;
    @Column(name = "ID_CONTA_CAIXA")
    private Integer idContaCaixa;
    @Column(name = "DATA_EMISSAO")
    @Temporal(TemporalType.DATE)
    private Date dataEmissao;
    @Column(name = "DATA_VENCIMENTO")
    @Temporal(TemporalType.DATE)
    private Date dataVencimento;
    @Column(name = "DATA_PAGAMENTO")
    @Temporal(TemporalType.DATE)
    private Date dataPagamento;
    @Column(name = "NUMERO_PARCELA")
    private Integer numeroParcela;
    // @Max(value=?)  @Min(value=?)//if you know range of your decimal fields consider using these annotations to enforce field validation
    @Column(name = "VALOR", precision = 18, scale = 6)
    private BigDecimal valor;
    @Column(name = "TAXA_JUROS", precision = 18, scale = 6)
    private BigDecimal taxaJuros;
    @Column(name = "TAXA_MULTA", precision = 18, scale = 6)
    private BigDecimal taxaMulta;
    @Column(name = "TAXA_DESCONTO", precision = 18, scale = 6)
    private BigDecimal taxaDesconto;
    @Column(name = "VALOR_JUROS", precision = 18, scale = 6)
    private BigDecimal valorJuros;
    @Column(name = "VALOR_MULTA", precision = 18, scale = 6)
    private BigDecimal valorMulta;
    @Column(name = "VALOR_DESCONTO", precision = 18, scale = 6)
    private BigDecimal valorDesconto;
    @Column(name = "TOTAL_PARCELA", precision = 18, scale = 6)
    private BigDecimal totalParcela;
    @Column(name = "HISTORICO", length = 3000)
    private String historico;
    @Column(name = "SITUACAO")
    private Character situacao;
    @JoinColumn(name = "ID_CONTAS_PAGAR_RECEBER", referencedColumnName = "ID", nullable = false)
    @ManyToOne(optional = false)
    private ContasPagarReceber idContasPagarReceber;

    public ContasParcelas() {
    }

    public ContasParcelas(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getIdMeiosPagamento() {
        return idMeiosPagamento;
    }

    public void setIdMeiosPagamento(Integer idMeiosPagamento) {
        this.idMeiosPagamento = idMeiosPagamento;
    }

    public Integer getIdChequeEmitido() {
        return idChequeEmitido;
    }

    public void setIdChequeEmitido(Integer idChequeEmitido) {
        this.idChequeEmitido = idChequeEmitido;
    }

    public Integer getIdContaCaixa() {
        return idContaCaixa;
    }

    public void setIdContaCaixa(Integer idContaCaixa) {
        this.idContaCaixa = idContaCaixa;
    }

    public Date getDataEmissao() {
        return dataEmissao;
    }

    public void setDataEmissao(Date dataEmissao) {
        this.dataEmissao = dataEmissao;
    }

    public Date getDataVencimento() {
        return dataVencimento;
    }

    public void setDataVencimento(Date dataVencimento) {
        this.dataVencimento = dataVencimento;
    }

    public Date getDataPagamento() {
        return dataPagamento;
    }

    public void setDataPagamento(Date dataPagamento) {
        this.dataPagamento = dataPagamento;
    }

    public Integer getNumeroParcela() {
        return numeroParcela;
    }

    public void setNumeroParcela(Integer numeroParcela) {
        this.numeroParcela = numeroParcela;
    }

    public BigDecimal getValor() {
        return valor;
    }

    public void setValor(BigDecimal valor) {
        this.valor = valor;
    }

    public BigDecimal getTaxaJuros() {
        return taxaJuros;
    }

    public void setTaxaJuros(BigDecimal taxaJuros) {
        this.taxaJuros = taxaJuros;
    }

    public BigDecimal getTaxaMulta() {
        return taxaMulta;
    }

    public void setTaxaMulta(BigDecimal taxaMulta) {
        this.taxaMulta = taxaMulta;
    }

    public BigDecimal getTaxaDesconto() {
        return taxaDesconto;
    }

    public void setTaxaDesconto(BigDecimal taxaDesconto) {
        this.taxaDesconto = taxaDesconto;
    }

    public BigDecimal getValorJuros() {
        return valorJuros;
    }

    public void setValorJuros(BigDecimal valorJuros) {
        this.valorJuros = valorJuros;
    }

    public BigDecimal getValorMulta() {
        return valorMulta;
    }

    public void setValorMulta(BigDecimal valorMulta) {
        this.valorMulta = valorMulta;
    }

    public BigDecimal getValorDesconto() {
        return valorDesconto;
    }

    public void setValorDesconto(BigDecimal valorDesconto) {
        this.valorDesconto = valorDesconto;
    }

    public BigDecimal getTotalParcela() {
        return totalParcela;
    }

    public void setTotalParcela(BigDecimal totalParcela) {
        this.totalParcela = totalParcela;
    }

    public String getHistorico() {
        return historico;
    }

    public void setHistorico(String historico) {
        this.historico = historico;
    }

    public Character getSituacao() {
        return situacao;
    }

    public void setSituacao(Character situacao) {
        this.situacao = situacao;
    }

    public ContasPagarReceber getIdContasPagarReceber() {
        return idContasPagarReceber;
    }

    public void setIdContasPagarReceber(ContasPagarReceber idContasPagarReceber) {
        this.idContasPagarReceber = idContasPagarReceber;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ContasParcelas)) {
            return false;
        }
        ContasParcelas other = (ContasParcelas) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.chronos.pafecf.entidades.ContasParcelas[ id=" + id + " ]";
    }
    
}
